home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / Include / assert.h next >
Encoding:
C/C++ Source or Header  |  2001-10-20  |  368 b   |  23 lines

  1. #ifndef _ASSERTH
  2. #define _ASSERTH
  3.  
  4. #pragma push_safeptr
  5.  
  6.  
  7. void _Assert(char *msg);
  8.  
  9. #undef assert
  10. #ifdef NDEBUG
  11. #define assert(test)
  12. #else
  13. #define __Str(x)  __Val(x)
  14. #define __Val(x)  #x
  15. #define assert(test)  ((test) ? (void) 0 : _Assert("In "__FILE__ ", line " __Str(__LINE__)  ": " #test ))
  16. #endif
  17.  
  18.  
  19. #pragma pop_ptr
  20.  
  21. #endif /* end _ASSERTH */
  22.  
  23.